package com.syiti.dev.example.service.consumer.app.modular.user.service.impl;

import com.syiti.dev.example.service.api.UserRpcService;
import com.syiti.dev.example.service.consumer.app.modular.user.dao.dataobject.UserDO;
import com.syiti.dev.example.service.consumer.app.modular.user.service.UserService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户
 *
 * @author caiti
 * @since 2021-06-16
 */
@Service
public class UserServiceImpl implements UserService {

	@DubboReference(version = "1.0.0")
	private UserRpcService userRpcService;

	@Override
	public UserDO getUser() {
		String username = userRpcService.getUsername();
		UserDO userDO = new UserDO();
		userDO.setUsername(username);
		return userDO;
	}

	@Override
	public List<UserDO> getUserList() {
		return null;
	}

}
